.class Lcom/example/m6wmr/ShareActivity$8;
.super Ljava/lang/Thread;
.source "ShareActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ShareActivity;->getappid()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ShareActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ShareActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    .line 479
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 8

    .prologue
    .line 481
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 483
    new-instance v5, Ljava/lang/StringBuilder;

    iget-object v6, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    iget-object v6, v6, Lcom/example/m6wmr/ShareActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v6}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "/index.php?ctrl=app&action=wxappset&datatype=json"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 486
    .local v4, "url":Ljava/lang/String;
    const-string v5, "Loginactivity"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "login() "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 487
    iget-object v5, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    iget-object v5, v5, Lcom/example/m6wmr/ShareActivity;->m:Lmyapp/MyApp;

    invoke-static {v4, v5}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v3

    .line 488
    .local v3, "str":Ljava/lang/String;
    const-string v5, "Loginactivity"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "data() "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 491
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 494
    .local v2, "msg":Landroid/os/Message;
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 495
    .local v1, "json":Lorg/json/JSONObject;
    const-string v5, "error"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "true"

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 498
    const-string v5, "msg"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    iput-object v5, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 499
    const/4 v5, 0x1

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 500
    iget-object v5, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    iget-object v5, v5, Lcom/example/m6wmr/ShareActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 521
    .end local v1    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 503
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_0
    const-string v5, "msg"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, ""

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 505
    const/16 v5, 0x15

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 506
    iget-object v5, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    iget-object v5, v5, Lcom/example/m6wmr/ShareActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 513
    .end local v1    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 515
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 516
    const/4 v5, 0x4

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 518
    iget-object v5, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    iget-object v5, v5, Lcom/example/m6wmr/ShareActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 509
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v5, "msg"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    sput-object v5, Lcom/example/m6wmr/ShareActivity;->appid:Ljava/lang/String;

    .line 510
    const/16 v5, 0xe

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 512
    iget-object v5, p0, Lcom/example/m6wmr/ShareActivity$8;->this$0:Lcom/example/m6wmr/ShareActivity;

    iget-object v5, v5, Lcom/example/m6wmr/ShareActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 526
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 527
    monitor-exit p0

    return-void

    .line 526
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
